/**
 * Created by xzm on 17/12/2017.
 */
import {postBody,post} from '../post'
import {get} from '../get'
import orderApi from '../../config/api/orderApi'

export function submitOrder(obj, token,randomKey) {
  return postBody(orderApi.submitOrder, obj, token,randomKey)
}

export function countOrderQuantity(obj, token) {
  return get(orderApi.countOrderQuantity, obj, token)
}

export function findOrders(obj, token) {
  return get(orderApi.findOrders, obj, token)
}

export function findOrder(obj, token) {
  return get(orderApi.findOrder, obj, token)
}

export function findOrderItem(obj, token) {
  return get(orderApi.findOrderItem, obj, token)
}
export function cancelOrder(obj, token) {
  return post(orderApi.cancelOrder, obj, token)
}
export function paymentOrder(obj, token) {
  return post(orderApi.paymentOrder, obj, token)
}
export function deliveryOrder(obj,token) {
  return post(orderApi.deliveryOrder,obj,token)
}
